Repository navigation
feat: bring the vland templates to the org standard, and fix vland init's git identity and hooks - #271
Merged
Conversation
🦋 Changeset detectedLatest commit: a64042e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Preview releaseLatest commit: Some packages have been released:
Note Use the PR number as tag to install any package. For instance: |
vland init forced GIT_AUTHOR_* and GIT_COMMITTER_* to vland <noreply@variable.land>, and those env vars outrank git config. The first commit never carried the user's identity, and a signed one showed as "Unverified" on GitHub. Read user.name and user.email in the new repo after git init, so includeIf identities apply, and pass -c only for the half git can't resolve. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
vland init installed dependencies before git init, so lefthook's postinstall found no repo and set up no hooks: theme-toggle, generated by vland, never ran its lefthook.yml. Run git init before the install, and make the scaffold commit with --no-verify, since the hooks are for the user's commits, not the template as generated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
…standard The templates still had setup-node, .node-version, changesets 2, checkout v4 and tag-pinned actions, and `@rrlab/cli@^0.1.0`, which doesn't exist, so a generated project couldn't even install. - mise.toml with `[settings] lockfile = true` and a mise.lock (revision 3, hence `min_version = "2026.9.16"`); no .node-version. - CI on checkout v7.0.1 without credentials, mise-action v4.3.0 and `pnpm install --frozen-lockfile`, then `rr check`, tests and build. The monorepo, which had no workflows, gets one with turbo's --affected. - workflow-audit.yml runs zizmor 1.30.1; every action is pinned by SHA. - changesets 3.0.3, changelog-github 1.0.1, schema 4.0.1, `format: false`, `commit: true`. The library releases with changesets/action v2.1.2 as vland-bot, like theme-toggle, without the preview jobs. - The changelog repo comes from the visibility (`withvariablelab/<name>` public, `variableland/<name>` private) instead of `<name>/<name>`. - pnpm-workspace.yaml: the org's release-age cooldown, lefthook in onlyBuiltDependencies and `sideEffectsCache: false`, so lefthook's postinstall installs the git hooks even when its build is cached. - From control: `node --watch --env-file-if-exists=.env` instead of tsx. - Fixes on the way: the library's publishConfig exports point at the .mjs/.d.mts that rr pack builds, the library README names the scoped package, and the monorepo app READMEs filter by the real package names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
rr loads run-run.config.mts with Node's built-in type stripping, unflagged from 22.18.0, so a generated project can't run rr on Node 20. Matches #272, which raises the floor of the published packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
With the oxc plugin, `rr check` runs `oxfmt --check`, which sorts package.json keys, so it failed on every generated package.json but the web app's. And vland appended a private library's `private: true` at the end. Reorder the templates' package.json files the way oxfmt writes them, which Biome accepts too, and set `private` right after `version`, mutating the object so pkg-types keeps the file's formatting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
With `rr plugins add oxc`, `rr check` failed on the backend and monorepo READMEs (oxfmt aligns Markdown tables) and on apps/api's health route (oxfmt breaks at 100 columns, Biome joins up to 120). With `biome`, it failed on the web app's import order. Align the tables, give the route a block body both formatters agree on, and sort App.tsx's imports. The init-templates test now runs oxfmt and Biome over every generated project. The READMEs say to narrow oxc to lint and format, since it and `ts` both provide the type-check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
rqbazan
force-pushed
the
feat/vland-templates-org-standard
branch
from
October 18, 2026 00:04
2501762 to
3c7dcc8
Compare
The audit scanned only .github/, so the workflows vland/templates/* generate were never checked: on main they have unpinned-uses, artipacked and excessive-permissions findings. Scan the repo root, like theme-toggle does; zizmor finds every .github/workflows under it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The vland templates get the org standard (brand, dx, env, theme-toggle, www), plus two
vland initfixes. Today a generated project can't even install:@rrlab/cli@^0.1.0doesn't exist.vland/templates/{library,backend,monorepo}/ -├── .node-version ├── mise.toml # + min_version 2026.9.16, pnpm 10.30.3, [settings] lockfile = true +├── mise.lock # node 24.21.0 + pnpm 10.30.3, 7 platforms, lockfile revision 3 +├── pnpm-workspace.yaml # release-age cooldown, lefthook in onlyBuiltDependencies, sideEffectsCache: false ├── package.json # @rrlab/cli ^1.3.4, changesets 3.0.3 + changelog-github 1.0.1, pnpm@10.30.3, engines node >=22.18.0 ├── .changeset/config.json # schema 4.0.1, format: false, commit: true, repo from visibility └── .github/workflows/ ├── ci.yml # checkout v7.0.1 (no credentials) → mise-action v4.3.0 → install --frozen-lockfile → rr check → test → build + ├── workflow-audit.yml # zizmor 1.30.1 └── release.yml # library: changesets/action v2.1.2 as vland-bot (theme-toggle's job, minus previews)engines.nodegoes to>=22.18.0, like the published packages in #272: rr loadsrun-run.config.mtswith Node's type stripping, unflagged from 22.18.0. Every action is pinned by SHA, and dx's own workflow audit now runs zizmor from the repo root, which also coversvland/templates/*/.github/workflows(on main they have unpinned-uses, artipacked and excessive-permissions findings; here, none). The monorepo had no.github/; its new CI tests and builds with--affectedagainstorigin/main.vland init(own commits, patch changesets):Placeholders. The changelog repo comes from the visibility:
withvariablelab/<name>for a public library,variableland/<name>for a private one and for every backend and monorepo. It was<name>/<name>, which theme-toggle had to fix by hand. The library README names the scoped package (pnpm add @variablelab/<name>).Every generated file passes oxfmt and Biome, so
rr checkstarts green with either plugin. oxfmt sortspackage.jsonkeys (vland now puts a private library'sprivateafterversion, instead of at the end), aligns Markdown tables and wraps at 100 columns. Biome sorts imports. The READMEs say to narrow oxc tooxc({ only: ["lint", "format"] }), because oxc andtsboth provide the type-check.Why
sideEffectsCache: false. Of these repos only dx has its git hooks installed. theme-toggle (generated by vland) and control have none, for three reasons:onlyBuiltDependencies.git init.This PR fixes all three. The cost: every time pnpm (re)links a dependency with an allowed build script, it reruns that script. Today that's only lefthook (and biome in the monorepo), so it's negligible. It grows if a project allows heavy native builds.
From
variableland/control:jdx/mise-action@v4,checkout@v5: not pinned by SHA (zizmor policy)timeout-minutes,concurrency, emoji step namesdevEngines,allowBuilds: the org is on pnpm 10.30.3 +packageManagerfetch-depth: 0+TURBO_SCM_BASE: origin/main+--affectedregistry-authand the pnpm-store cache composites: no org repo needs themnode --watch --env-file-if-exists=.envinstead oftsx: nothing loaded.envbeforeremotes: they point atvariableland/dx(the old org) and need the network; decision 004 inlines the configcatalog:, oxc typecheck by default: the templates shipplugins: [], which is the user's decision[tasks.setup]: for a new project it would only bepnpm installmise.lock: shipped in the template, not generated atinit, for now. Generating it atinitis viable:mise locktakes ~1.5 s, writes all 7 platforms and, with mise 2026.10, locks only the project's tools (not global or parent ones). It would get a fresh node patch and a lock revision that matches the user's mise, with nomin_version. Against it:initwould needmiseonPATH, a trust env for the new dir, and a fallback when mise is missing. I propose it as a follow-up.Changesets. minor for the templates:
vland init's interface doesn't change, but the generated project needs new things (mise ≥ 2026.9.16, theVLAND_BOT_CLIENT_IDvariable andVLAND_BOT_PRIVATE_KEYsecret) and behaves differently (pnpm changesetcommits). The twoinitfixes are patch.Evidence
Before:
vland init my-lib -t library→pnpm install→ERR_PNPM_NO_MATCHING_VERSION No matching version found for @rrlab/cli@^0.1.0.mise install --lockedfails: there is no lock.After, each template generated with the local vland, under mise isolated from my global config (
MISE_CONFIG_DIR/MISE_GLOBAL_CONFIG_FILEon an empty config):mise install --lockedinstalls node 24.21.0 and pnpm 10.30.3 into an emptyMISE_DATA_DIR(macOS arm64; the linux-x64 entries come from mise's metadata, not a run);pnpm install, the README'srr plugins add … --yesandrr jsc --fix(see Merge Danger), thenrr check,pnpm testandrr pack(pnpm buildin the monorepo) pass;pnpm test --affectedworks;pnpm devanswers{"ok":true}on the port set in.env;secrets-outside-envon the bot key, auditor persona);overrides: in all 6 projects (library, backend and monorepo, each with biome or with oxc), everyrr plugins addwithout--yesand without a TTY, thenrr check,rr test, andrr packorpnpm build, exit 0. In the monorepo that includestsandtsdownper workspace, withapps/webon the inferred React preset.Tests (
vland/cli/test/integration/), red on main, green here:The format test uses the dx workspace's oxfmt and Biome. A bump that changes their output makes it fail, and the fix is to reformat the templates.
With my real git config, the
initcommit is mine and carries an SSH signature.Not verified: the backend's
docker build(no daemon here), the release workflow end to end, and whether a private library's repo invariablelandhas vland-bot's variable and secret. That last one is an assumption.Merge Danger
Door: two-way
Blast Radius: every
vland initvland downloads the templates from
withvariablelab/dx#mainon everyinit, so this reaches every installed vland the moment it merges, before any release. With the published vland 0.3.7,{{githubOwner}}and{{packageName}}stay literal in.changeset/config.jsonand the library README. Merge, then release vland in the same sitting.Until #276 (it fixes
rr plugins add) is released: without a TTY,rr plugins add biome|ts|tsdownneeds--yes(otherwise it waits on a prompt and exits 13), andrr checkfails afterrr plugins add biomeuntilrr jsc --fix. The READMEs already tell agents to pass--yes.Out of scope, for later: the monorepo has changesets but no release path, and the ts plugin rewrites
@types/nodeto>=20.🤖 Generated with Claude Code
https://claude.ai/code/session_01Tj9MBgi2cQcRxSD9uikx6k